package com.huitone.gddw.service.dto;

import com.huitone.gddw.common.excel.ColToProperty;
import com.huitone.gddw.common.excel.TabCol;
import com.huitone.gddw.dao.entity.AffixRule;

/**
 * 附加条件规则 DTO 对象
 * @author wuluodan
 *
 */
public class AffixRuleDTO {

	@ColToProperty
	@TabCol(Index = 1, title = "序号", width = "")
	private Integer seq;
	
	private String affixRuleId;
	
	@ColToProperty
	@TabCol(Index = 2, title = "附加条件短信名称", width = "105")
	private String affixRuleName;
	
	private String svrNode;
	
	@ColToProperty
	@TabCol(Index = 3, title = "业务端名称", width = "90")
	private String svrNodeName;
	
	private String serviceCode;
	
	@ColToProperty
	@TabCol(Index = 4, title = "短信类型名称", width = "90")
	private String serviceName;
	
	@ColToProperty
	@TabCol(Index = 5, title = "附加内容", width = "120")
	private String affixSm;
	
	@ColToProperty
	@TabCol(Index = 6, title = "回复短信", width = "90")
	private String moSm;
	
	@ColToProperty
	@TabCol(Index = 7, title = "回复时效（小时）", width = "105")
	private Integer timeLen;
	
	private String status;
	
	@ColToProperty
	@TabCol(Index = 8, title = "状态", width = "")
	private String statusStr;
	
	@ColToProperty
	@TabCol(Index = 9, title = "说明", width = "150")
	private String desc;

	public AffixRuleDTO() {}
	
	public AffixRuleDTO(AffixRule entity) {
		this.setAffixRuleId(entity.getAffixRuleId());
		this.setAffixRuleName(entity.getAffixRuleName());
		this.setSvrNode(entity.getSvrNode());
		this.setServiceCode(entity.getServiceCode());
		this.setAffixSm(entity.getAffixSm());
		this.setMoSm(entity.getMoSm());
		this.setTimeLen(entity.getTimeLen());
		this.setStatus(entity.getStatus());
		this.setDesc(entity.getDesc());
	}
	
	public Integer getSeq() {
		return seq;
	}

	public void setSeq(Integer seq) {
		this.seq = seq;
	}

	public String getAffixRuleId() {
		return affixRuleId;
	}

	public void setAffixRuleId(String affixRuleId) {
		this.affixRuleId = affixRuleId;
	}

	public String getAffixRuleName() {
		return affixRuleName;
	}

	public void setAffixRuleName(String affixRuleName) {
		this.affixRuleName = affixRuleName;
	}

	public String getSvrNode() {
		return svrNode;
	}

	public void setSvrNode(String svrNode) {
		this.svrNode = svrNode;
	}

	public String getSvrNodeName() {
		return svrNodeName;
	}

	public void setSvrNodeName(String svrNodeName) {
		this.svrNodeName = svrNodeName;
	}

	public String getServiceCode() {
		return serviceCode;
	}

	public void setServiceCode(String serviceCode) {
		this.serviceCode = serviceCode;
	}

	public String getServiceName() {
		return serviceName;
	}

	public void setServiceName(String serviceName) {
		this.serviceName = serviceName;
	}

	public String getAffixSm() {
		return affixSm;
	}

	public void setAffixSm(String affixSm) {
		this.affixSm = affixSm;
	}

	public String getMoSm() {
		return moSm;
	}

	public void setMoSm(String moSm) {
		this.moSm = moSm;
	}

	public Integer getTimeLen() {
		return timeLen;
	}

	public void setTimeLen(Integer timeLen) {
		this.timeLen = timeLen;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getStatusStr() {
		if (null == this.status) {
			return "未知";
		}
		if (this.status.equals("1")) {
			return "有效";
		}
		if (this.status.equals("0")) {
			return "失效";
		}
		return "未知";
	}

	public void setStatusStr(String statusStr) {
		this.statusStr = statusStr;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
	
}
